<!doctype html>
<html lang="en" layout:decorate="~{layout/admin}"
      xmlns:layout="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <title>用户列表</title>
</head>
<body>
<div class="container">
    <div layout:fragment="content">
        <div class="row" >
            <div class="col-md-12">
                <div class="white-box">
                    <div class="slimscrollright">
                        <table class="dataTable" id="dataTable">
                            <thead>
                            <tr>
                                <th>头像</th>
                                <th>昵称</th>
                                <th>合伙人</th>
                                <th>粉丝数</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each="user : ${users}">
                                <td>
                                    <img th:src="${user.avatar}" alt="" style="max-width:60px;">
                                </td>
                                <td data-th-text="${user.nickName}"></td>
                                <td>
                                    <span class="label" data-th-classappend="${user.isAgent}? 'label-success' :'label-danger' "  data-th-text="${user.isAgent == true ? '是' : '否'} "></span>
                                </td>w
                                 <td data-th-text="${user.fansCount}"></td>
                                <td>
                                    <a th:href="@{/admin/users/change/{id}(id=${user.id})}" class="btn btn-primary refuse-link">加粉</a>
                                    <a th:href="@{/admin/users/recusal/{id}(id=${user.id})}" th:classappend="${user.isAgent}? 'btn-warning' :'btn-info' " th:text="${user.isAgent ? '取消合伙人资格':'授予合伙人资格'}" class="btn get-link"></a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>